const { ipcRenderer } = require("electron")

export const useEvent = () => {
  // 打开子窗口
  const openToolbar = () => {
    ipcRenderer.send("create-child-window")
  }
  // 关闭子窗口
  const closeToolbar = () => {
    ipcRenderer.send("close-child-window")
  }

  return { openToolbar, closeToolbar }
}